/*
 * Copyright (c) 2016, www.zm0618.com All Rights Reserved..
 */

package com.ibetter.mr.parse.medic;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

/**
 * Created by zhaojun on 2016/12/06.
 */
public class CleanDumpShareMapper extends Mapper<LongWritable,Text,Text,NullWritable> {
    @Override
    protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
        if (value!=null){
          /*  String strValue=value.toString();
            if (StringUtils.isNotBlank(strValue)){
                String[] kvStr = strValue.split(" ");
                LongWritable doctorIdKeyLong=new LongWritable(0);
                LongWritable medicInfoIdLong=new LongWritable(0);
                String doctorIdStr=kvStr[0];
                String medicInfoIdStr=kvStr[1];
                doctorIdKeyLong.set(Long.parseLong(StringUtils.trim(doctorIdStr)));
                medicInfoIdLong.set(Long.parseLong(StringUtils.trim(medicInfoIdStr)));


                context.write(doctorIdKeyLong,medicInfoIdLong);
            }*/
            NullWritable nullValue=NullWritable.get();
            context.write(value,nullValue);
        }
    }
}
